<template>
    <div>
        <div class="title border-bottom">热销推荐</div>
        <ul>
            <router-link
                :to="'/detail/'+ ele.id"  
                class="item border-bottom"
                v-for="ele in list"
                :key="ele.id"
                tag="li"
            >
                <div class="item-img-wrapper">
                    <img :src="ele.imgUrl" alt="" class="item-img s">
                </div>
                <div class="item-info">
                    <p class="item-title">{{ ele.title }}</p>
                    <p class="item-desc">{{ ele.desc }}</p>
                    <button class="item-button">查看详情</button>
                </div>
            </router-link>
        </ul>
    </div>
</template>
<script>
export default {
    name:'HomeRecommend',
    props:{
        list:Array
    },
    data(){
        return{
            recommendList:[
                {
                    id:'001',
                    imgUrl:'//img1.qunarzz.com/sight/p0/1508/96/b195d4ecbd48b7fc3ae049106f15c7ef.water.jpg_256x160_92934f01.jpg',
                    title:'泰山',
                    desc:'五岳之首，登泰山保平安'
                },{
                    id:'002',
                    imgUrl:'//img1.qunarzz.com/sight/p0/1508/96/b195d4ecbd48b7fc3ae049106f15c7ef.water.jpg_256x160_92934f01.jpg',
                    title:'泰山',
                    desc:'五岳之首，登泰山保平安'
                },{
                    id:'003',
                    imgUrl:'//img1.qunarzz.com/sight/p0/1508/96/b195d4ecbd48b7fc3ae049106f15c7ef.water.jpg_256x160_92934f01.jpg',
                    title:'泰山',
                    desc:'五岳之首，登泰山保平安'
                },{
                    id:'004',
                    imgUrl:'//img1.qunarzz.com/sight/p0/1508/96/b195d4ecbd48b7fc3ae049106f15c7ef.water.jpg_256x160_92934f01.jpg',
                    title:'泰山',
                    desc:'五岳之首，登泰山保平安'
                }
            ]
        }
    }
}
</script>
<style lang="stylus" scoped>
    @import '~@/assets/styles/mixins.styl';
    .title
        margin-top: .2rem
        height:.8rem
        line-height: .8rem
        background: #eee
        text-indent:.2rem
    .item
        overflow:hidden 
        display:flex
        height:1.9rem
        .item-img
            width: 1.7rem
            height 1.7rem
            padding:.1rem
        .item-info
            flex: 1
            padding: .1rem
            overflow: hidden
            .item-title
                line-height:.54rem
                font-size: .32rem
                overflow:hidden
                white-space: nowrap
                text-overflow: ellipsis
            .item-desc
                line-height: .4rem
                color: #ccc
                ellipsis()
            .item-button
                line-height:.44rem
                margin-top:.2rem
                background: #ff9300
                padding: 0 .1rem
                border-radius:.06rem
                color:#fff




        
</style>